<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      SDL-1.2.15
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-2020-04-02">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 2020-04-02
      </h4>
      <h3>
        Chapter&nbsp;42.&nbsp;Multimedia Libraries and Drivers
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="sbc.html" title="SBC-1.4">Prev</a>
          <p>
            SBC-1.4
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="sdl2.html" title="SDL2-2.0.12">Next</a>
          <p>
            SDL2-2.0.12
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="libdriv.html" title=
          "Chapter&nbsp;42.&nbsp;Multimedia Libraries and Drivers">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 2020-04-02">
          Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="sdl" name="sdl"></a>SDL-1.2.15
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <h2 class="sect2">
          Introduction to SDL
        </h2>
        <p>
          The Simple DirectMedia Layer (<span class="application">SDL</span>
          for short) is a cross-platform library designed to make it easy to
          write multimedia software, such as games and emulators.
        </p>
        <p>
          This package is known to build and work properly using an LFS-9.1
          platform.
        </p>
        <h3>
          Package Information
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (HTTP): <a class="ulink" href=
                "http://www.libsdl.org/release/SDL-1.2.15.tar.gz">http://www.libsdl.org/release/SDL-1.2.15.tar.gz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: 9d96df8417572a2afb781a7c4c811a85
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 3.8 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated disk space required: 40 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated build time: 0.6 SBU
              </p>
            </li>
          </ul>
        </div>
        <h3>
          SDL Dependencies
        </h3>
        <h4>
          Optional
        </h4>
        <p class="optional">
          <a class="xref" href="../general/aalib.html" title=
          "AAlib-1.4rc5">AAlib-1.4rc5</a>, <a class="xref" href="alsa.html"
          title="ALSA-1.2.2">ALSA-1.2.2</a>, <a class="xref" href=
          "../x/glu.html" title="GLU-9.0.1">GLU-9.0.1</a>, <a class="xref"
          href="../general/nasm.html" title="NASM-2.14.02">NASM-2.14.02</a>,
          <a class="xref" href="pulseaudio.html" title=
          "PulseAudio-13.0">PulseAudio-13.0</a>, <a class="xref" href=
          "../general/pth.html" title="Pth-2.0.7">Pth-2.0.7</a>, <a class=
          "xref" href="../x/installing.html" title=
          "Chapter&nbsp;24.&nbsp;X Window System Environment">X Window
          System</a>, <a class="ulink" href=
          "http://pkgs.fedoraproject.org/repo/pkgs/directfb/">DirectFB</a>,
          <a class="ulink" href="http://ibiblio.org/ggicore/">GGI</a>,
          <a class="ulink" href=
          "http://caca.zoy.org/wiki/libcaca">libcaca</a>, <a class="ulink"
          href="http://picogui.org/">PicoGUI</a>, and <a class="ulink" href=
          "https://www.svgalib.org/">SVGAlib</a>
        </p>
        <p class="usernotes">
          User Notes: <a class="ulink" href=
          "http://wiki.linuxfromscratch.org/blfs/wiki/sdl">http://wiki.linuxfromscratch.org/blfs/wiki/sdl</a>
        </p>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          Installation of SDL
        </h2>
        <p>
          Install <span class="application">SDL</span> by running the
          following commands:
        </p>
        <pre class="userinput">
<kbd class=
"command">sed -e '/_XData32/s:register long:register _Xconst long:' \
    -i src/video/x11/SDL_x11sym.h &amp;&amp;

./configure --prefix=/usr --disable-static &amp;&amp;

make</kbd>
</pre>
        <p>
          Now, as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">make install &amp;&amp;

install -v -m755 -d /usr/share/doc/SDL-1.2.15/html &amp;&amp;
install -v -m644    docs/html/*.html \
                    /usr/share/doc/SDL-1.2.15/html</kbd>
</pre>
      </div>
      <div class="testing" lang="en" xml:lang="en">
        <h2 class="sect2">
          Testing SDL
        </h2>
        <p>
          If you wish to, test the installation of <span class=
          "application">SDL</span> using the included test programs. It is
          not required to install any of the resulting binaries to validate
          the installation. Issue the following commands to build the test
          programs:
        </p>
        <pre class="userinput">
<kbd class="command">cd test &amp;&amp;
./configure &amp;&amp;
make</kbd>
</pre>
        <p>
          You'll need to manually run all the test programs (they are listed
          in the <code class="filename">README</code> file in this
          directory). Many of them will need to be manually killed, and
          you'll need to turn your speakers on with the volume at a suitable
          level.
        </p>
      </div>
      <div class="commands" lang="en" xml:lang="en">
        <h2 class="sect2">
          Command Explanations
        </h2>
        <p>
          <span class="command"><strong>sed -e ...</strong></span>: This
          command fixes compilation with libX11-1.6.0 and later.
        </p>
        <p>
          <em class="parameter"><code>--disable-static</code></em>: This
          switch prevents installation of static versions of the libraries.
        </p>
        <p>
          <code class="option">--disable-alsa-shared</code>: This switch
          disables dynamically loading ALSA shared libraries.
        </p>
        <p>
          <code class="option">--disable-sdl-dlopen</code>: This switch
          disables using dlopen for shared object loading. Loading image
          backend libraries like libpng dynamically on the fly does not work.
        </p>
        <p>
          <code class="option">--disable-x11-shared</code>: This switch
          disables dynamically loading X11 shared libraries.
        </p>
      </div>
      <div class="configuration" lang="en" xml:lang="en">
        <h2 class="sect2">
          Configuring SDL
        </h2>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3"></h3>
          <h4 class="title">
            <a id="idm140006416451456" name=
            "idm140006416451456"></a>Configuration Information
          </h4>
          <p>
            As with most libraries, there is no configuration to do, save
            that the library directory, i.e., <code class=
            "filename">/opt/lib</code> or <code class=
            "filename">/usr/local/lib</code> should appear in <code class=
            "filename">/etc/ld.so.conf</code> so that <span class=
            "command"><strong>ldd</strong></span> can find the shared
            libraries. After checking that this is the case, <span class=
            "command"><strong>/sbin/ldconfig</strong></span> should be run
            while logged in as <code class="systemitem">root</code>.
          </p>
        </div>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          Contents
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed Program:</strong>
              <span class="segbody">sdl-config</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Libraries:</strong>
              <span class="segbody">libSDL.so and libSDLmain.a</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Directories:</strong>
              <span class="segbody">/usr/include/SDL and
              /usr/share/doc/SDL-1.2.15</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="sdl-config" name="sdl-config"></a><span class=
                    "term"><span class=
                    "command"><strong>sdl-config</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    determines the compile and linker flags that should be
                    used to compile and link programs that use <code class=
                    "filename">libSDL</code>.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="libsdl" name="libsdl"></a><span class=
                    "term"><code class="filename">libSDL.so</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    contains functions that provide low level access to
                    audio, keyboard, mouse, joystick, 3D hardware via OpenGL,
                    and 2D frame buffer across multiple platforms.
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <p class="updated">
        Last updated on 2020-03-09 10:02:12 -0500
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="sbc.html" title="SBC-1.4">Prev</a>
          <p>
            SBC-1.4
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="sdl2.html" title="SDL2-2.0.12">Next</a>
          <p>
            SDL2-2.0.12
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="libdriv.html" title=
          "Chapter&nbsp;42.&nbsp;Multimedia Libraries and Drivers">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 2020-04-02">
          Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
